class Tiger:
    classname = 'tiger'
    def __init__(self,weight):#实例方法
        self.weight = weight
        # t1.weight = weight
        print('我是初始化方法')
#实例方法
    def roar(self):
        print('wow')
        self.weight = self.weight - 5
#
    def feed(self,food):
        if food == '肉':
            self.weight = self.weight + 10
            print('喂食正确！')
        else:
            self.weight = self.weight - 10
            print('喂食错误！')
#
# #静态方法 == 类方法
#     @staticmethod
#     def tell():
#         print('我是类方法')
#
#     def speck(self):#实例方法

class Sheep:
    classname = 'Sheep'
    pass

class Room:
    classname = 'room'
    def __init__(self,num,animal):
        self.num = num
        self.animal = animal

class souTiger(Tiger):#继承父类Tiger值
    souName = '华南地区'
    def __init__(self,weight):
        # super().__init__(weight) #父类初始化方法
        # Tiger.__init__(self,weight) #父类初始化方法
        super(souTiger,self).__init__(weight)


    def roar(self):
        print('我是子类的roar')
        super(souTiger,self).roar()

s1 = souTiger(100)
s1.roar()
print(s1.weight)


# s1 = souTiger(100)
# print(s1.classname)
# print(s1.souName)

# t1 = Tiger(100)
# print(t1.weight)
# # t1.roar()
# t1.feed('草')
# print('叫后的体重：', t1.weight)
# r1 = Room(1,Tiger(500))
# print(r1.animal.weight)
# r1.animal.roar()
# r1.animal.feed('cao')
# t1.tell()
# t2 = Tiger(200)
# print(t2.weight)

